Don't read non-initialized clip region
authorAlexander Larsson <alexl@redhat.com>
Sat, 18 Jul 2009 19:55:17 +0000 (21:55 +0200)
committerAlexander Larsson <alexl@redhat.com>
Sat, 18 Jul 2009 21:15:57 +0000 (23:15 +0200)
The clip region is only initialized (and needed) for viewable windows.

gdk/gdkwindow.c

index 35416b4d89d1c6cfb18eb409d7d45523449af751..10fc70adb34b5b09c3b692cba78221aab785ca7e 100644 (file)
@@ -7269,7 +7269,7 @@ gdk_window_shape_combine_region (GdkWindow       *window,
     gdk_region_destroy (private->shape);
 
   old_region = NULL;
-  if (GDK_WINDOW_IS_MAPPED (window))
+  if (private->viewable)
     old_region = gdk_region_copy (private->clip_region);
 
   if (shape_region)